package edu.zut.hb.software.teacher.service.impl;


import edu.zut.hb.software.base.service.impl.GenericTreeManagerImpl;
import edu.zut.hb.software.teacher.domain.TeacherGroup;
import edu.zut.hb.software.teacher.service.TeacherGroupService;
import edu.zut.hb.software.teacher.dao.TeacherGroupDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.List;

@Service
@Transactional
public class TeacherGroupServiceImpl extends GenericTreeManagerImpl<TeacherGroup, Long>
        implements TeacherGroupService {


    TeacherGroupDao teacherGroupDao;

    @Autowired
    public void TeacherGroupDao(TeacherGroupDao teacherGroupDao) {
        this.teacherGroupDao = teacherGroupDao;
        this.treeDao=teacherGroupDao;
        this.dao=treeDao;
    }

    @Override
        public List list() {
            List list = new ArrayList();
            for (int i = 0; i < 100; i++) {
                TeacherGroup teacherGroup = new TeacherGroup();
                teacherGroup.setName("名称"+i);
                teacherGroup.setAddress("地址"+i);
                teacherGroup.setPhone("号码"+i);
                list.add(teacherGroup);
            }
            return list;

        }




}
